<!DOCTYPE html>
<html>
<head>
	<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
	<meta charset="UTF-8">
	<title></title>
</head>
<body>
</body>
<script type="text/javascript">
if (true) {
  function f() {console.log("this is function1");}
}

// 情况二
try {
  function f() {console.log("this is function2");}
} catch(e) {
  // ...
}

window.onload = function() {
	var url = "http://www.baidu.com";
	var link = document.createElement("a");
	var link_text = document.createTextNode("source");
	link.appendChild(link_text);
	link.setAttribute("href", url);
	$("body").append(link);
	
	var sup = document.createElement("sup");
	sup.appendChild(link);
	$("body").append(sup);
}
</script>
</html>